﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VideoBlog.Data.Entities
{
    public partial class Video : global::System.Data.Objects.DataClasses.EntityObject
    {

        public string Slug {
            get {
                char[] arr = VideoTitle.ToCharArray();
                arr = Array.FindAll<char>(arr, (c => (char.IsLetterOrDigit(c) || char.IsWhiteSpace(c) || c == '-')));
                string res = new string(arr);
                return res.Replace(' ', '-').ToLower();
            }
        }
    
    }
}
